var tpl = _include('./index.html');
appendCss(_include('./index.less?_ac=less'));

var uploadimg = {
    template:tpl,
    props:["src"],
    computed:{
        imgsrc:{
            get:function(){
                return this.src;
            },
            set:function(result){
                this.src=result;
            }
        }
    },
    methods:{
        change:function(event){
            var file = event.target.files[0];
            var reader = new FileReader();
            reader.onload = function() {
                this.imgsrc=reader.result;
                this.$emit('listenmsgfromchild',this.imgsrc);
            }.bind(this);
            reader.readAsDataURL(file);
        }
    }
};

module.exports = uploadimg;

var str = 'a=1&si=222';
